//
//  CardBackView.h
//  SmartCheckout
//
//  Created by Barak Edry on 1/27/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ReflectionView.h"
#import "Card.h"

@protocol CardBackViewDelegate 

- (void) cardEditingDidFinish;

@end

@interface CardBackView : ReflectionView{
    UIImageView* backgroundImage;
    UITextField* nameInput;
    UIButton* doneButton;
    UIButton *changePINButton;
    id<CardBackViewDelegate> __unsafe_unretained deleage;
    Card* card;
}

@property (unsafe_unretained, nonatomic, readwrite) id<CardBackViewDelegate> deleage;

@property (strong, nonatomic) IBOutlet UIImageView *backgroundImage;

@property (strong, nonatomic) IBOutlet UITextField *nameInput;
    
@property (strong, nonatomic) IBOutlet UIButton *doneButton;
@property (strong, nonatomic) IBOutlet UIButton *changePINButton;

@property (strong, readwrite, nonatomic) Card* card;

- (void) update;

- (IBAction)done:(id)sender;

+ (CardBackView*) backViewWithCard:(Card*)card;

- (IBAction)colorSelected:(id)sender;

@end
